Ask the user for a number between 2 and 1000. Calculate the integer square root by calculating the square of...
Ask the user for a number between 2 and 1000. Calculate the integer square root by calculating the square of every number from 1 until the square of the number is more than the number entered. The previous number is the integer square root. For example, if the user enters 15, your program would calculate:
1x1 = 1, 2x2 = 4, 3x3 = 9, 4x4 = 16
Since 16 is too high, the integer square root of 15 is 3. YOU MUST write a function called
intSqrRoot which calculates the answer and returns it to main; call it as follows:
answer = intSqrRoot(num);
cout << "The integer square root of ";
cout << num << " is " << answer << endl;
11 years ago
3
Answer(1)![blurred-text]()
![]()
Purchase the answer to view it

NOT RATED
- include.docx
Bids(0)
other Questions(10)
- BCOM275 Week 5 Learning Team Assignment Debate Paper
- need hellp in Law and ethics.
- ACC 291 WEEK 4 DQ 1
- PAD 530 Assignment 4: Analysis of the Agency’s Policies, Procedures, and Plans Regarding Unions, Privatization, Pensions, and Productivity, Part 4
- MGT 415 Final Paper: Group Behavior in Organizations
- LT-Project Planning - Technical Paper.doc
- Please help with my homework?
- International BRIC case study (2500 word minimum)
- Week Five - ECO 561 - Chapter 8 Quiz.doc
- Good morning. Dr. Brown's office. ___ I help you?